export type ProjectMember = {
  id: number;
  username: string;
  email: string;
  role: string;
  createdAt: string;
  updatedAt: string;
  status: 'normal' | 'disabled';
  projectRole: string | null;
};

export type ProjectItem = {
  id: number;
  name: string;
  description: string;
  createdBy: {
    id: number;
    username: string;
    email: string;
    role: 'admin' | 'developer' | 'tester';
    status: 'normal' | 'disabled';
  }
  startedAt: string;
  endsAt: string;
  isEndEarly: boolean;
  createdAt: string;
  updatedAt: string;
};

export type CreateProjectRequest = {
  name: string;
  description: string;
  endsAt?: string;
  startedAt?: string;
}

export type NoneResponse = {
  code: number;
  msg: string;
  data: null;
}

export type GetAllProjectResponse = {
  code: number;
  msg: string;
  data: {
    total: number;
    records: ProjectItem[];
  };
}

export type GetJoinedProjectResponse = {
  code: number;
  msg: string;
  data: ProjectItem[];
}

export type GetProjectByIdResponse = {
  code: number;
  msg: string;
  data: ProjectItem;
}

export type GetMemberResponse = {
  code: number;
  msg: string;
  data: ProjectMember[];
}